package openbang.account.service.entity;


import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.NotPersistent;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

import openbang.account.service.vo.MsgStatusEnum;

import com.google.gwt.user.client.rpc.IsSerializable;

import java.util.Date;


/**
 * The persistent class for the msg_receive database table.
 * 
 */
@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class MsgReceive implements IsSerializable {

	@PrimaryKey
	@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
	private Long id;

	@Persistent
	private Integer readStatus=MsgStatusEnum.PENDING_READ.getCode();

	@Persistent
	private Date readTime;

	@Persistent
	private String receiverEmail="";

	@Persistent
	private Long receiverId=0L;

	@Persistent
	private Date updTime= new Date();


	/**
	 * 发送消息的ID
	 */
	@Persistent
	private Long msgId;
	
	//无主的一对多关系
	@NotPersistent
	private MsgAsyn msgAsyn;

    public MsgReceive() {
    }

	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Integer getReadStatus() {
		return this.readStatus;
	}

	public void setReadStatus(Integer readStatus) {
		this.readStatus = readStatus;
	}

	public Date getReadTime() {
		return this.readTime;
	}

	public void setReadTime(Date readTime) {
		this.readTime = readTime;
	}

	public String getReceiverEmail() {
		return this.receiverEmail;
	}

	public void setReceiverEmail(String receiverEmail) {
		this.receiverEmail = receiverEmail;
	}

	public Long getReceiverId() {
		return this.receiverId;
	}

	public void setReceiverId(Long receiverId) {
		this.receiverId = receiverId;
	}

	public Date getUpdTime() {
		return this.updTime;
	}

	public void setUpdTime(Date updTime) {
		this.updTime = updTime;
	}

	public MsgAsyn getMsgAsyn() {
		return this.msgAsyn;
	}

	public void setMsgAsyn(MsgAsyn msgAsyn) {
		this.msgAsyn = msgAsyn;
	}

	public Long getMsgId() {
		return msgId;
	}

	public void setMsgId(Long msgId) {
		this.msgId = msgId;
	}
	
}